<template>
  <div>
    <Header></Header>
    <div class="content">
      <div class="bread_nav flex-box">
        <div class="bread fs16 col3">
          当前位置：<router-link to="/">首页</router-link>><router-link to="/info">个人中心</router-link>><a
            href="javascript:;"
            >发票管理</a
          >
        </div>
      </div>
      <div class="personal pt30 m1440 flex-box flex-col-start">
        <!-- 左侧菜单 -->
        <leftnav @getLeftIndex="getLeftIndex"></leftnav>
        <!-- 右侧菜单 -->
        <div class="right_box flex-grow-1">
          <!-- 基本信息 -->
          <info v-if="leftIndex == 0"></info>
          <!-- 证书抬头 -->
          <certificate v-if="leftIndex == 1"></certificate>
          <!-- 发票管理 -->
          <invoices v-if="leftIndex == 2"></invoices>
        </div>
        <div></div>
      </div>
    </div>
    <Footer></Footer>
  </div>
</template>
<script>
import leftnav from "../components/leftnav.vue";
import info from "../components/info.vue";
import certificate from "../components/certificate.vue";
import invoices from "../components/invoices.vue";
export default {
  components: {
    leftnav,
    info,
    certificate,
    invoices,
  },
  data() {
    return {
      leftIndex: 0,
    };
  },
  methods: {
    getLeftIndex(index) {
      this.leftIndex = index;
    },
  },
};
</script>
